/* 通用样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    max-width: 700px;
    width: 100%;
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
}

/* 卡片通用样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #eef2f5;
    padding: 20px;
    margin-bottom: 20px;
}

/* 添加 Todo 卡片 */
.add-todo-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.add-todo-card input[type="text"],
.add-todo-card textarea {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.add-todo-card input[type="text"]:focus,
.add-todo-card textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    outline: none;
}

.add-todo-card textarea {
    resize: vertical;
    min-height: 70px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex; /* 改为inline-flex以适应内容 */
    align-items: center;
    justify-content: center;
    gap: 6px; /* 图标和文字的间距 */
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.primary-btn {
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    padding: 12px 20px;
}

.danger-btn {
    background-color: #f44336;
    color: white;
}

.secondary-btn {
    background-color: #f0f2f5;
    color: #555;
    border: 1px solid #d9dce0;
}

.secondary-btn:hover {
    background-color: #e4e7eb;
}

/* 待办事项列表 */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #eef2f5;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.todo-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.todo-content {
    flex-grow: 1;
    margin-right: 15px;
    padding-left: 5px;
}

.todo-content h3 {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.todo-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.todo-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* 防止按钮组被压缩 */
}

/* 图标样式 */
.material-icons {
    font-size: 18px; /* 调整图标大小 */
    vertical-align: middle; /* 确保垂直对齐 */
}

/* 完成状态 */
.todo-item.completed {
    background-color: #f7f7f7;
    opacity: 0.7;
}

.todo-item.completed .todo-content h3,
.todo-item.completed .todo-content p {
    text-decoration: line-through;
    color: #888;
}

/* 模态框 (样式不变) */
.modal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); }
.modal-content { background-color: #fefefe; margin: 10% auto; padding: 30px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 10px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); position: relative; display: flex; flex-direction: column; gap: 15px; }
.modal-content h2 { text-align: center; color: #2c3e50; margin-top: 0; margin-bottom: 20px; }
.modal-content input[type="text"], .modal-content textarea { padding: 12px 15px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 16px; }
.close-button { color: #aaa; position: absolute; right: 20px; top: 15px; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-button:hover, .close-button:focus { color: #333; }

/* 空状态 */
.empty-state { text-align: center; padding: 50px 20px; color: #777; font-size: 18px; background-color: #fafafa; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.empty-state .material-icons { font-size: 60px; color: #b0bec5; }